/**
 * 
 */
package org.extdev.libraries.ltr;

import com.sun.jna.Structure;

/**
 * @author LAP
 *
 */
public class LTR11 extends Structure {
	public int size;
	
	public LTR channel;
	
	public int startADCMode;
	
	public int inputeMode;
	
	public int lChQnt;
	
	public byte[] lChTbl = new byte[LTR11APIConstants.LTR11_MAX_LCHANNEL];
	
	public int adcMode;
	
	public ADCRate adcRate;
	
	public double chRate;
	
	public INFO_LTR11 moduleInfo;
	
	public LTR11() {
		super();
		initFieldOrder();
	}
	
	protected void initFieldOrder() {
		setFieldOrder(new String[] {"size", "channel", "startADCMode", "inputeMode", "lChQnt", "lChTbl", "adcMode", "adcRate", "chRate", "moduleInfo"});
	}	
	
	public static class ADCRate extends Structure{
		public int divider;
		public int prescaler;
		
		protected void initFieldOrder() {
			setFieldOrder(new String[] {"divider", "prescaler"});
		}
		
		public ADCRate() {
			super();
			initFieldOrder();
		}
		
		public ADCRate(int divider, int prescaler) {
			super();
			this.divider = divider;
			this.prescaler = prescaler;
			initFieldOrder();
		}
		
		public static class ByReference extends ADCRate implements Structure.ByReference {};
		public static class ByValue extends ADCRate implements Structure.ByValue{};
	}
	
	public static class ByReference extends LTR11 implements Structure.ByReference {};
	public static class ByValue extends LTR11 implements Structure.ByValue{};
}
